package v1.com.autoresource.mapper;

import v1.com.autoresource.aop.SelectDataSource;
import v1.com.autoresource.config.DynamicDataResourceHolder;
import v1.com.autoresource.model.dao.TbOrder;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface TbOrderMapper {
    int deleteByPrimaryKey(Long id);

    int insert(TbOrder record);

    int insertSelective(TbOrder record);

    @SelectDataSource(dataSource = DynamicDataResourceHolder.SLAVE_DATA_SOURCE)
    TbOrder selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(TbOrder record);

    int updateByPrimaryKey(TbOrder record);

    @SelectDataSource(dataSource = DynamicDataResourceHolder.SLAVE_DATA_SOURCE)
    List<TbOrder> batchQueryByIds(@Param("gtId") Long gtId, @Param("size") int size);

    int batchInsert(List<TbOrder> tbOrderList);
}